<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8"/>
    <title>添加</title>
    <link href="__STATIC__/component/pear/css/pear.css" rel="stylesheet"/>
</head>
<body class="childrenBody {:dialog_css()}">

<div class="layui-card">
	<div class="layui-card-body" style="padding:0;">
		<div class="layui-tab layui-tab-brief">
			<ul class="layui-tab-title">
				<li><a href="{:url('index')}">本地主题</a></li>
				<li><a href="{:url('online')}">在线主题</a></li>
				<li class="tab-add layui-this"><a href="{:url('add')}"><i class="layui-icon layui-icon-add-1"></i></a></li>
			</ul>
		</div>

		<blockquote class="layui-elem-quote" style="margin-top:10px;">创建主题后，编辑 <code>template/[标识]</code> 目录下的模板。</blockquote>

		<form class="layui-form" action="{:url('add')}" method="post">

			<div class="layui-form-item">
				<label class="layui-form-label layui-form-item-required">标识</label>
				<div class="layui-input-block"><input type="text" name="sign" value="demo" lay-verify="required" placeholder="请输入标识" class="layui-input"/></div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label layui-form-item-required">标题</label>
				<div class="layui-input-block"><input type="text" name="title" value="测试主题" lay-verify="required" placeholder="请输入标题" class="layui-input"/></div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label layui-form-item-required">简介</label>
				<div class="layui-input-block"><textarea name="intro" id="editor-intro" placeholder="请输入简介" class="layui-textarea">测试主题简介</textarea></div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label layui-form-item-required">版本</label>
				<div class="layui-input-block"><input type="text" name="version" value="1.0"  lay-verify="required" placeholder="请输入版本" class="layui-input"/></div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label layui-form-item-required">价格</label>
				<div class="layui-input-block"><input type="number" name="price" value="0.00"  min="0.00" step="1" lay-affix="number" placeholder="请输入价格" class="layui-input"/></div>
			</div>


			<div class="layui-form-item">
				<label class="layui-form-label layui-form-item-required">作者</label>
				<div class="layui-input-block"><input type="text" name="author" value="无念"  lay-verify="required" placeholder="请输入作者" class="layui-input"/></div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label layui-form-item-required">链接</label>
				<div class="layui-input-block"><input type="text" name="link" value="https://www.aphpcms.com"  lay-verify="url" placeholder="请输入链接" class="layui-input"/></div>
			</div>


			<div class="layui-form-item layer-footer">
				<div class="layui-input-block">
					<button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="" lay-filter="save">
						<i class="layui-icon layui-icon-ok"></i>
						创建
					</button>
					<button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
						<i class="layui-icon layui-icon-refresh"></i>
						重置
					</button>
				</div>
			</div>
		</form>

	</div>
</div>



<script src="__STATIC__/component/layui/layui.js"></script>
<script src="__STATIC__/component/pear/pear.js"></script>
<script>
    layui.use(['aphpForm', 'aphp', 'form'], function () {
        var aphpForm = layui.aphpForm,
            aphp = layui.aphp,
            form = layui.form;

        aphpForm.bindEvent('form.layui-form');

		form.on('submit(save)', function (data) {
			aphp.request.postForm(data, 2);
			return false;
		});
    })
</script>
</body>
</html>